echoc()
{
    echo -e "\033[36m $1 \033[0m"
}

echoe()
{
    echo -e "\033[31m $1 \033[0m"
}

echoc "rn.sh react_native_bundle"
# echoc "生成common.bundle"
# react-native bundle --platform android --dev false --entry-file src/common.js --bundle-output ./android/app/src/main/assets/common.android.bundle --assets-dest ./android/app/src/main/res/
# echoc "生成index.bundle"
# react-native bundle --platform android --dev false --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res/
echoc "生成差分index_.bundle文件"
sort android/app/src/main/assets/index.android.bundle android/app/src/main/assets/common.bundle android/app/src/main/assets/common.bundle | uniq -u > android/app/src/main/assets/index_.bundle
# sort $2 $1 $1 | uniq -u > $3 #回写